/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.audit.controller;

import com.koron.audit.domain.WorkFlowDepartment;
import com.koron.audit.domain.WorkFlowStaffBean;
import com.koron.audit.service.api.WorkFlowDeptAndStaffService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@Api(tags = "workFlowDeptAndStaff",description = "封装组织架构和人员数据供工作流使用")
@RequestMapping("/workFlowDeptAndStaff")
@ResponseBody
public class WorkFlowDeptAndStaffController {

    @Autowired
    private WorkFlowDeptAndStaffService service;

    @ApiOperation("获取组织架构列表")
    @RequestMapping(value = "toWorkFlowDepartmentList.htm",method = RequestMethod.GET)
    public List<WorkFlowDepartment>  toWorkFlowDepartmentList(){
        List<WorkFlowDepartment> list=service.toWorkFlowDepartmentList();
        return list;

    }

    @ApiOperation("获取人员列表")
    @RequestMapping(value = "toWorkFlowStaffList.htm",method = RequestMethod.GET)
    public List<WorkFlowStaffBean>  toWorkFlowStaffList(){
        List<WorkFlowStaffBean> list=service.toWorkFlowStaffList();
        return list;

    }

}
